package bulider;

/**
 * @author 761472239
 * @Classname Director
 * @Description 指挥 建造者中的方法完成复杂对象的创建。
 * @Date 2021/8/31 22:20
 */
public class Director {

    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    // 创建产品
    public Computer construct() {
        builder.buildPartA();
        builder.buildPartB();
        builder.buildPartC();
        return builder.getProduct();

    }
}
